package com.example.mytest.annotation4;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * @ClassName: TransactionalService
 * @Description: TODO 这是一个复合注解， @Service 和 @Transactional 组合来进行服务层的逻辑开发
 * @Author: 230689
 * @Date: 2021/9/8 17:06
 * @Version: v1.0
 */

@Service
@Transactional(rollbackFor = Exception.class,timeout=5)
@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface TransactionalService {
}
